package com.fh.controller;

import com.fh.model.Users;
import com.fh.service.UserAddService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("useradd")
@RestController
public class UserAddController {

    @Resource
    private UserAddService userAddService;

    @PostMapping("add")
    public int addUser(@RequestBody  Users user){
        return  userAddService.addUser(user);
    }

}
